<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.List" %>
<%@ page import="entity.ImageItem" %>
<%@ page import="util.ItemHelper" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<link type="text/css" rel="stylesheet" href="stylesheets/browser.css" />
		<script type="text/javascript" src="scripts/browser.js"></script>
		<title>Upload Image To Battle</title>
		<%
			String url = request.getParameter("url");
		
			List<ImageItem> imgList = ItemHelper.getItemsForDuel(10);
		%>
	</head>
	<body>
		<div id='top-pane'>
			<a href='battle.jsp' id='back-button'>Back To Battle</a>
			<div id='title'>Img Battle</div>
			<a id='upload' href='upload.jsp'>
				<div id='plus'></div>
				<div id='upload-text'>Upload An Image</div>
			</a>
		</div>
		<div id='bottom-pane'>
			<div id='battle-pane'>
						<img class='battle-img' src='<%= url %>'></img>
			</div>
			<div id='last-battle-pane'>
				<div class='section'>
					<div class='section-header'>More Images In This Category</div>
					<table id='last-battle'>
						<tr>
							<td><div class="image-holder"><img src='<%= imgList.get(0).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(1).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(2).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(3).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(4).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(5).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(6).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(7).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(8).getUrl() %>' class='thumb'></div></td>
							<td><div class="image-holder"><img src='<%= imgList.get(9).getUrl() %>' class='thumb'></div></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</body>
</html>